  <nz-spin [nzSpinning]="isSpinning" nzTip="{{'processing' | translate}}">
    <div class="panel-index-cont" style="padding: 10px;overflow-y:auto;">
      <div class="panel-index">
        <div class="hd" style="padding-bottom: 5px;border-bottom: 8px solid #D1D3DA;">
            <span style="padding-right:15px;">
                {{'dev_type' | translate}}:&nbsp;
                <span class="wt_600">{{LoginForm['name']}}</span>
            </span>
            <span style="padding-right:15px;">
                {{'eas_work_mode' | translate}}:&nbsp;
                <span class="wt_600">{{workModeItem['title']}}</span>&nbsp;
                <a (click)="switchMode()" *ngIf="!state">{{'eas_change_mode' | translate}}</a>
            </span>
            <div style="display: inline-block;">
                <div *ngFor="let item of AMtype;let i=index;" style="display: inline-block;padding-right: 25px;">
                    <span class="antenna_name" [ngClass]="{'selectName': selectedAntenna==item.value}" (click)="changeAmType(item.value)">{{item.title}}</span>
                    <span class="antenna_icon" [ngClass]="{'light-color': (i==0 && isAMmainShow) || (i==1 && isAMsubsidiaryShow)}"></span>
                </div>
            </div>
            <a (click)="exit()" class="cm-right">{{'sign_out' | translate}}</a>
        </div>
        <div class="bd container">
            <div class="aside_left">       
            <div class="chart_container">
                <div style="position:relative;padding: 5px;border-bottom:1px solid #D1D3DA"> 
                    <nz-switch  nzCheckedChildren="{{'running' | translate}}" nzUnCheckedChildren="{{'stoping' | translate}}" [(ngModel)]="state"  (ngModelChange)="stateChange()"></nz-switch>
                    <div  class="legend_area">          
                        <span style="background:#FF0000;" class="legend_icon"></span>
                        <span >Tx Window</span>
                        <span style="background:#00CC00;"  class="legend_icon"></span>
                        <span>Rx Window</span>
                    </div>
                    <div class="debug-am-move"  nz-row *ngFor="let data of sameMoveList">
                        <label nz-col nzSpan="5" style="margin-right: 5px;">{{data.title}}</label>
                        <span nz-col nzSpan="2" >{{data.min}}</span>
                        <nz-progress [nzPercent]="currentKeyVal['key'+data.key]/data.max*100" [nzFormat]="formatOne" nz-col nzSpan="6"></nz-progress>
                        <span nz-col nzSpan="4">{{data.max}}(ms)</span>
                        <nz-input-number   nzSpan="5" nz-col [nzMin]="data.min" [nzMax]="data.max" [nzStep]="movefrequently=='50'?0.1:0.0835" [(ngModel)]="currentKeyVal['key'+data.key]" (ngModelChange)="sameMoveChange()"></nz-input-number>
                        <button style="margin-left: 5px;height: 25px;padding: 0 8px;" nzSpan="4" nz-button nzType="primary" (click)="saveMove(data.key)">{{'save' | translate}}</button>
                    </div>
                </div>
                <div class="chart_content">
                    <div class="chart_wave">
                        <div *ngIf="state" echarts [options]="signalWaveOption" class="echart" style="z-index:99;"></div>
                        <div  *ngIf="xtotal!==0 && state" class="echart2" style="z-index:999;">
                            <div class="barItem barItem0"></div>
                            <div class="barItem barItem1"></div>
                            <div class="barItem barItem2"></div>
                            <div class="barItem barItem3"></div>
                            <div class="barItem barItem4"></div>
                            <div class="barItem barItem5"></div>
                        </div>
                    </div>
                    <div class="signal_container">
                        <div class="wt_600" style="padding: 0 0 5px 5px;">{{signalItem['title']}}</div>
                        <div class="chart_signal"  *ngIf="selectedAntenna==AMtype[0].value">
                            <div *ngFor="let data of signalList" style="flex:1;display: flex;flex-direction: column;">
                                <div style="text-align:center;padding-bottom: 5px;">{{currentKeyVal['key'+data.key]}}mv</div>
                                <div class="signal_item">
                                    <div style="flex:1;"></div>
                                    <div [ngStyle]="{'width':'100%','height':(currentKeyVal['key'+data.key]/5000)*100+'%','background':data.key=='b1'?'#00CC00':'#FF0000'}"></div>
                                </div>
                                <div style="text-align:center;padding-top: 5px;">
                                    {{data.title}}
                                </div>
                            </div>
                        </div> 
                        <div class="chart_signal"  *ngIf="selectedAntenna==AMtype[1].value">
                            <div *ngFor="let data of signalSecondList" style="flex:1;display: flex;flex-direction: column;">
                            <div style="text-align:center;padding-bottom: 5px;">{{currentKeyVal['key'+data.key]}}mv</div>
                            <div class="signal_item">
                                <div style="flex:1;"></div>
                                <div [ngStyle]="{'width':'100%','height':(currentKeyVal['key'+data.key]/5000)*100+'%','background':data.key=='b3'?'#00CC00':'#FF0000'}"></div>
                            </div>
                            <div style="text-align:center;padding-top: 5px;">
                                {{data.title}}
                            </div>
                            </div>
                        </div> 
                    </div>
                </div>      
            </div>
            <div class="function_config" *ngIf="selectedAntenna==AMtype[0].value">
                <div *ngFor="let data of AMmainList" nz-row>
                    <label nz-col nzSpan="6">{{data.title}}</label>
                    <span nz-col nzSpan="2" *ngIf="data.key!=43 && data.key!=46">{{data.min}}</span>
                    <nz-progress [nzPercent]="currentKeyVal['key'+data.key]/data.max*100" [nzFormat]="formatOne" nz-col nzSpan="9" *ngIf="data.key!=43 && data.key!=46"></nz-progress>
                    <span nz-col nzSpan="3" *ngIf="data.key!=43 && data.key!=46">{{data.max}}</span>
                    <nz-input-number  [nzDisabled]="state" nzSpan="4" nz-col [nzMin]="data.min" [nzMax]="data.max"  *ngIf="data.key!=43 && data.key!=46" [(ngModel)]="currentKeyVal['key'+data.key]" (ngModelChange)="sendAntConfigOrder(data.key,$event)"></nz-input-number>
                    <nz-radio-group  [nzDisabled]="state" style="margin-top:-6px;" nzSpan="17" nz-col [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key==43" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                        <label nz-radio-button *ngFor="let item of frequencyList" [nzValue]="item.value">{{item.title}}</label>
                    </nz-radio-group> 
                    <nz-radio-group [nzDisabled]="state"  style="margin-top:-6px;" nz-col nzSpan="17" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key==46" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                        <label nz-radio-button *ngFor="let item of launchDirList" [nzValue]="item.value">{{item.title}}</label>
                    </nz-radio-group> 
                </div>
            </div>    
            <div class="function_config" *ngIf="selectedAntenna==AMtype[1].value">
                <div *ngFor="let data of AMsubsidiaryList" nz-row>
                    <label nz-col nzSpan="6">{{data.title}}</label>
                    <span nz-col nzSpan="2" *ngIf="data.key!=53 && data.key!=56">{{data.min}}</span>
                    <nz-progress [nzPercent]="currentKeyVal['key'+data.key]/data.max*100" [nzFormat]="formatOne" nz-col nzSpan="9" *ngIf="data.key!=53 && data.key!=56"></nz-progress>
                    <span nz-col nzSpan="3"  *ngIf="data.key!=53 && data.key!=56">{{data.max}}</span>
                    <nz-input-number [nzDisabled]="state" nz-col nzSpan="4"  [nzMin]="data.min" [nzMax]="data.max"  *ngIf="data.key!=53 && data.key!=56" [(ngModel)]="currentKeyVal['key'+data.key]" (ngModelChange)="sendAntConfigOrder(data.key,$event)"></nz-input-number>
                    <nz-radio-group  [nzDisabled]="state" style="margin-top:-6px;" nz-col nzSpan="17" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key==53"  (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                        <label nz-radio-button *ngFor="let item of frequencyList" [nzValue]="item.value">{{item.title}}</label>
                    </nz-radio-group> 
                    <nz-radio-group  [nzDisabled]="state" nz-col nzSpan="17" style="margin-top:-6px;"  [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key==56"  (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                        <label nz-radio-button *ngFor="let item of launchDirList" [nzValue]="item.value">{{item.title}}</label>
                    </nz-radio-group> 
                </div>
            </div>    
        </div>
        <div class="aside_right">
            <div class="right_one">
                <div class="wt_600" style="flex:1;">{{antenEleItem['title']}}</div>
                <div class="one_content">
                  <div *ngFor="let data  of elecList" class="content_ele">
                    <div class="one_name">{{data.title}}</div>
                    <div class="one_value">
                      <span [ngStyle]="{'background':'#074eb1','display':'inline-block','height':'100%','width':currentKeyVal['key'+data.key]>50?'100%':(currentKeyVal['key'+data.key]/50)*100+'%'}"></span>
                    </div>
                    <div style="display: inline-block;color:#074eb1">{{currentKeyVal['key'+data.key]}}A</div>
                  </div>
                </div>
            </div>
            <div class="right_three">
                <div class="wt_600">{{'function_config' | translate}}</div>
                    <div *ngFor="let data of otherCMDList" class="other_set">
                      <label>{{data.title}}</label>
                      <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='60'" (ngModelChange)="receiveTimeChange(data.key,$event)">
                        <label nz-radio-button *ngFor="let item of receiveTime" [nzValue]="item.value">{{item.title}}</label>
                      </nz-radio-group> 
                      <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='4a'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                          <label nz-radio-button *ngFor="let item of wireFlipList" [nzValue]="item.value">{{item.title}}</label>
                      </nz-radio-group> 
                    </div>
              </div>
            <div class="right_two">
                <div class="wt_600" style="padding-bottom:5px;">{{'eas_alarm_config' | translate}}</div>
                <button  nz-button nzType="primary" (click)="testAlarm()" style="padding:4px;" [disabled]="state">{{alarmTestItem['title']}}</button>
                <div *ngFor="let data of AMalarmList">
                    <label>{{data.title}}</label>
                    <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='4c'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                      <label nz-radio-button *ngFor="let item of alermColorList" [nzValue]="item.value" [ngStyle]="{'color':currentKeyVal['key'+data.key]==item.value?'#fff':item.title,'background':item.title,'marginRight':'5px'}">{{currentKeyVal['key'+data.key]==item.value?'√':'&nbsp;&nbsp;'}}</label>
                    </nz-radio-group> 
                    <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='5b'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                      <label nz-radio-button *ngFor="let item of lightColorList" [nzValue]="item.value" [ngStyle]="{'color':currentKeyVal['key'+data.key]==item.value?'#fff':item.title,'background':item.title,'marginRight':'5px'}">{{currentKeyVal['key'+data.key]==item.value?'√':'&nbsp;&nbsp;'}}</label>
                    </nz-radio-group> 
                    <nz-radio-group [nzDisabled]="state"  [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='5a'" style="padding:0 6px;" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                      <label nz-radio-button *ngFor="let item of alarmLightTimeList" [nzValue]="item.value">{{item.title}}</label>
                    </nz-radio-group> 
                    <nz-radio-group  [nzDisabled]="state"  [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='59'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                      <label nz-radio-button *ngFor="let item of alermRateList" [nzValue]="item.value">{{item.title}}</label>
                    </nz-radio-group>  
                </div>
            </div>
            <div class="right_four">
                <div class="wt_600">{{'more_info' | translate}}</div>
                <div>
                    <span style="padding-right:25px;">
                        {{'hardware_version' | translate}}：{{currentKeyVal['key5e']}}
                    </span>
                    <span> 
                        {{'software_version' | translate}}：1.1.12
                    </span>
                </div>
            </div>
          </div>
        </div>
        <div class="footer">
            <a (click)="readParam()">{{'read_param' | translate}}</a>
            <nz-divider nzType="vertical"></nz-divider>
            <a (click)="restoreFactory()">{{restoreFactoryItem['title']}}</a>
        </div>
      </div>
    </div>
    <nz-modal [(nzVisible)]="isModeChangeShow"  nzWidth="400px" nzTitle="{{'eas_change_mode' | translate}}" [nzContent]="modalContent2" [nzFooter]="modalFooter2"  (nzOnCancel)="cancel()">
        <ng-template #modalContent2>
            <nz-list [nzDataSource]="workModeList" nzBordered [nzItemLayout]="'horizontal'" [nzHeader]="null" [nzRenderItem]="item" [nzSplit]="true">
                <ng-template #item let-item>
                    <nz-list-item style="cursor:pointer;" [nzContent]="item.title" (click)="chooseWorkMode(item)" [ngClass]="{'activeItem':item.key==selectedMode}"></nz-list-item>
                </ng-template>
            </nz-list>
          </ng-template>
          <ng-template #modalFooter2>
              <button nz-button  nzType="primary" (click)="saveMode()" [disabled]="!selectedMode">{{'OK' | translate}}</button>
          </ng-template>
      </nz-modal>
  </nz-spin>
